find the intervals of concavity